Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension: add Craft & Code #6016

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

@martinwork
Copy link
Contributor Author

@abchatra
How to execute code only on hardware?

This extension has a cpp file simply to avoid strobing a simulator pin
https://github.com/KitronikLtd/pxt-kitronik-Craft-and-Code/blob/master/customPinControl.cpp

I suggested using control.deviceName(). Is there a better way?
https://makecode.microbit.org/_ATpc8WHe5RJ7
image

@abchatra
Copy link
Collaborator

@martinwork that seems good way to me. Other hardware specific API are deviceSerialNumber, hardwareVersion etc. But harder to parse on what is for hardware and what is not.

@martinwork
Copy link
Contributor Author

Thanks @abchatra !

@abchatra
Copy link
Collaborator

@martinwork is this good to merge or are we waiting on this?

@martinwork
Copy link
Contributor Author

@abchatra I think we can go ahead. @KitronikLtd have the deviceName fix ready in a branch.
https://github.com/KitronikLtd/pxt-kitronik-Craft-and-Code/tree/v1.0.3

@abchatra abchatra merged commit d1c862a into microsoft:master Nov 26, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants